import { observable } from "mobx";

const todoStore = observable({
  list: [
    { id: "001", text: "吃饭", done: false },
    { id: "002", text: "睡觉", done: false },
  ],

  addTodo(text: string) {
    this.list.push({
      id: "003",
      text,
      done: false,
    });
  },
});

export default todoStore;
